//
//  TKIMSDKSet.h
//  TKIM_标准版
//
//  Created by liupm on 16/8/19.
//  Copyright © 2016年 liupm. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger,TKIMFileUpLoadMode) {
    TKIMFileUpLoadModeCommon,//普通上传
    TKIMFileUpLoadModeCBUS//C网关上传
};

@interface TKIMSDKConfig: NSObject
@property(nonatomic,copy) NSString *generalUrl;//业务服务器地址
@property(nonatomic,copy) NSString *xmppHostName;//openfire主机名
@property(nonatomic,copy) NSString *xmppDomain;//域名
@property(nonatomic,assign) NSInteger xmppPort;//openfire端口
@property(nonatomic,copy) NSString *fileUpDownUrl;//文件上传下载地址
@property(nonatomic,copy) NSString *mqttHostName;//mqtt主机名
@property(nonatomic,assign) NSInteger mqttPort;//mqtt端口
@property(nonatomic,copy) NSString *httpPushUrl;//http推送业务服务器地址
@property(nonatomic,copy) NSString *xmppUrl;

@property(nonatomic,assign) NSInteger mode;//im模式：0：http   1：xmpp
@property(nonatomic,assign) NSTimeInterval keepAliveInterval;//心跳时间
@property(nonatomic,copy) NSString *appkey;//应用KEY
@property(nonatomic,assign) BOOL isNeedAuthSessionKey;//是否需要验证sessionKey
//@property(nonatomic,copy) NSString *selfCertificatePath;//自建证书
@property(nonatomic,assign) BOOL isNeedDB;//是否需要存本地库
@property(nonatomic,assign) BOOL showLog;//是否打印日志
@property(nonatomic,assign) BOOL isNeedMessageReceipt;//是需要消息回执
@property(nonatomic,assign) BOOL isUploadDeviceToken;//是需要自动上传推送token
@property(nonatomic,copy) NSString *pushAppKey;//推送应用KEY
@property(nonatomic,copy) NSString *pushAppSecret;//推送应用
@property(nonatomic,assign) BOOL openMqtt;//是否开启mqtt连接
@property(nonatomic,assign) BOOL isMsgSendByReceipt;//是否通过回执确认消息是否发送成功
@property(nonatomic,assign) BOOL isSyncMsgTrace;//是否上传消息轨迹

@property(nonatomic,strong) NSDictionary *userTypes;//用户类型
@property(nonatomic,strong) NSDictionary *channels;//渠道类型

@property(nonatomic,strong) Class<TKIMDataDecoderProtocol> dataDecoder;//数据解析类
@property(nonatomic,copy) NSString *deviceType;//设备类型

@property(nonatomic,copy) NSString *pushSystemId;//push c接入系统编号
@property(nonatomic,copy) NSString *pushCompanyId;//push c接入公司编号
@property(nonatomic,assign) BOOL pushCGateway;//push是否是C的接入

@property(nonatomic,copy) NSString *imSystemId;//im c接入系统编号
@property(nonatomic,copy) NSString *imCompanyId;//im c接入公司编号
@property(nonatomic,assign) BOOL imCGateway;//im 是否是C的接入

@property(nonatomic,strong) Class<TKIMServiceProtocol> socketService;//c接入请求业务类

@property(nonatomic,assign) TKIMFileUpLoadMode fileUpMode;
@property(nonatomic,copy) NSString *fileBusinessCode;
@property(nonatomic,copy) NSString *fileUpCBusID;//上传 c接入系统编号
@property(nonatomic,copy) NSString *tkConverseUrl;
@property(nonatomic,copy) NSString *tkUserMaxDay;
@property(nonatomic,copy) NSString *tkNotiMaxDay;

+(TKIMSDKConfig *)shareInstance;

/**
 * @Author 刘鹏民, 15-01-09 15:01:29
 *
 * 获得xml某个配置
 * @param key 如果是多层级格式：key1.key2.key3
 * @return
 */
-(id)getConfigByKey:(NSString *)key;


/**
 * @Author 刘鹏民, 15-01-09 15:01:29
 *
 * 改变某个配置
 * @param key 如果是多层级格式：key1.key2.key3
 * @param value
 * @return
 */
-(void)setConfigWithKey:(NSString *)key value:(NSObject *)value;


/**
 *  @Author lpm, 16-12-13 16:12:38
 *
 *  @brief  获得用户类型值
 *
 *  @param name 类型名
 */
-(NSInteger)getUserType:(NSString *)name;

/**
 *
 *  @brief  传入参数来设置是YC还是YCP环境(请放在TKIMSDKConfig各种使用的最前面!!)
 *
 *  @param isYCP YES:生产环境  NO:测试环境
 */
- (void)isYCP:(BOOL)isYCP;

@end
